﻿<local:DocumentBase x:Class="WPFExcelReport.YCAAUTOEK"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock" 
                    xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    Loaded="Window_Loaded" 
                    FontSize="16" 
                    Background="White" 
                    HorizontalAlignment="Stretch"
                    Margin="0,0,0,0" 
                    VerticalAlignment="Stretch"
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="Set4ITX" />
        <db:SETINTEXDB  x:Key="SetVITX" />
        <CollectionViewSource   x:Key="vwABPOS_MAT" Source="{Binding Path=ABPOS_MAT,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwVAFARBEN_EXT" Source="{Binding Path=VAFARBEN_EXT,Source={StaticResource SetData}}" />
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Column="0">
            <Expander Name="expLog" ExpandDirection="Left" IsExpanded="True" Visibility="Hidden">
                <WrapPanel Name="zoneCommand" Height="34" Margin="0,0,0,6">
                    <Label   Content="系统" Width="Auto" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                    <TextBox   Name="txtMANDANT" MaxLength="2" Width="40" Margin="10,0,0,0" Text="00" HorizontalAlignment="Left" Background="Pink" FontSize="18" />
                    <Label  Content="语言" Width="Auto" Margin="0,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                    <TextBox   IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1" HorizontalAlignment="Left" Background="Pink" FontSize="18" />
                    <Label  Content="用户名" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                    <TextBox  Name="txtUserID" Width="80" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="True" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0" />
                    <Label Content="密码" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                    <PasswordBox  Name="txtPassword" Width="80" Margin="10,0,0,0" HorizontalAlignment="Left" Background="Yellow" FontSize="18" KeyboardNavigation.TabIndex="1" />
                    <Button  Height="Auto" Margin="10,0,0,0" Name="btnLogIn" Width="34" Click="btnLogIn_Click" KeyboardNavigation.TabIndex="2" IsDefault="True">
                        <Button.Background>
                            <ImageBrush  ImageSource="/IntexReportClient;component/Images/User.png" />
                        </Button.Background>
                    </Button> 
                    <TextBlock  Name="txtLogIn" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" Background="White" FontSize="14" KeyboardNavigation.TabIndex="1" />
                </WrapPanel>
            </Expander>
            <StackPanel>
                <Grid Height="448">
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" MaxHeight="300"/>
                        <RowDefinition   Height="Auto" MaxHeight="600"/> 
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition  Width="140" />                         
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                        <StackPanel >
                            <Button Name="butExcelLoad" Width="40" Height="40" HorizontalAlignment="Left" Click="butExcelLoad_Click">
                                <Button.Background>
                                    <ImageBrush  ImageSource="/IntexReportClient;component/Images/excel_icon_1.png" />
                                </Button.Background>
                            </Button>
                            <TextBlock>数据载入</TextBlock>
                        </StackPanel>
                        <StackPanel >
                            <Button Name="btnSaveWork" Click="btnSaveWork_Click" Margin="30,0,0,0" Height="40" Width="40">
                                <Button.Background>
                                    <ImageBrush  ImageSource="/IntexReportClient;component/Images/Upload.png" />
                                </Button.Background>
                            </Button>
                            <TextBlock Margin="30,0,0,0" >上传数据</TextBlock>
                        </StackPanel>
                        <StackPanel Grid.Row="0" Grid.Column="0"
            Grid.ColumnSpan="4" Orientation="Horizontal" >
                            <TextBlock FontSize="18"  Height="40"   Width="59" Name="txt1" Margin="0,0,0,0" Text="采购单" />
                            <TextBox Background="Yellow"  FontSize="18"  Height="36"   Width="40" Name="txtEKPAUFKRS" CharacterCasing="Upper" Margin="10,0,0,0" Text="WP" />
                            <TextBox Background="White"  FontSize="18" Height="36"    Width="80" Name="txtEKPAUFLFD"   Margin="15,0,0,0" Text="000000" />
                            <TextBox Background="White"  FontSize="18" Height="36"    Width="40" Name="txtEKPAUFPOS"   Margin="15,0,0,0" Text="000" />
                            <TextBlock FontSize="18"  Height="40"   Width="Auto" Margin="0,0,0,0" Text="确认删除" />
                            <TextBox Background="White"  FontSize="18" Height="36"    Width="Auto" Name="txtDelete"   Margin="15,0,0,0" Text="N" />
                            <Button FontSize="18" Content="删除" Height="40" Margin="20,0,0,0" Name="butDelete" Click="butDelete_Click"></Button>
                            <Button FontSize="18" Content="查询" Height="40" Margin="20,0,0,0" Name="butGetData" Click="btnQuery_Click"></Button>
                            <Button Content="打印"  FontSize="18" Height="40" Margin="20,0,0,0"  Name="btnPrint" Width="Auto" Click="btnPrint_Click"/>
                        </StackPanel>
                    </WrapPanel>                  
                    <StackPanel  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="20,0,0,0" Grid.RowSpan="1">
                        <TextBlock Name="listGS08N"></TextBlock>
                        <DataGrid  x:Name="dlgABPOS_EXT"
                       ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOS_MAT}}"  
                       AutoGenerateColumns="False" EnableRowVirtualization="True"
                       VerticalScrollBarVisibility="Auto"
                       HorizontalScrollBarVisibility="Auto"
                        MaxHeight="300"
                       VerticalAlignment="Stretch"
                       HeadersVisibility="Column" 
                       FontSize="16"
                       HorizontalAlignment="Stretch"
                       SelectionChanged="dlgABPOS_SelectionChanged"    
                        EnableColumnVirtualization="True">
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Path=ROWID}" Header="行" Width="Auto" MinWidth="40" />
                                <DataGridTextColumn Binding="{Binding Path=FS05}" Header="BOM" Width="Auto" MinWidth="100" />
                                <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="款式" Width="Auto" MinWidth="100" />
                                <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="颜色" Width="Auto" MinWidth="60" />
                                <DataGridTextColumn Binding="{Binding Path=ABPLIEFDAT}" Header="交期" Width="Auto" MinWidth="40" />
                                <DataGridTextColumn Binding="{Binding Path=ABPGROES}" Header="S" Width="Auto" MinWidth="40" />
                                <DataGridTextColumn Binding="{Binding Path=ABPGROEM}" Header="M" Width="Auto" MinWidth="40" />
                                <DataGridTextColumn Binding="{Binding Path=ABPGROEL}" Header="L" Width="Auto" MinWidth="60" />
                                <DataGridTextColumn Binding="{Binding Path=ABPGROEXL}" Header="XL" Width="Auto" MinWidth="60" /> 
                            </DataGrid.Columns>
                        </DataGrid>       
                    </StackPanel>
                    <TextBlock Grid.Row="1" Grid.Column="2" HorizontalAlignment="Stretch" Name="listABPOS"></TextBlock>
                </Grid>
            </StackPanel>
        </StackPanel> 
    </Grid>    
</local:DocumentBase>